package com.zhangfb95.crosschain.server.service;

import com.zhangfb95.crosschain.protocol.exc.request.GetAccountExcReq;
import com.zhangfb95.crosschain.protocol.exc.request.GetBlockByNumberExcReq;
import com.zhangfb95.crosschain.protocol.exc.request.GetHeightExcReq;
import com.zhangfb95.crosschain.protocol.exc.request.GetTxByIdExcReq;
import com.zhangfb95.crosschain.protocol.exc.request.QueryExcReq;
import com.zhangfb95.crosschain.protocol.exc.request.SendExcReq;
import com.zhangfb95.crosschain.protocol.exc.request.SignExcReq;
import com.zhangfb95.crosschain.protocol.exc.response.GetAccountExcRes;
import com.zhangfb95.crosschain.protocol.exc.response.GetBlockByNumberExcRes;
import com.zhangfb95.crosschain.protocol.exc.response.GetHeightExcRes;
import com.zhangfb95.crosschain.protocol.exc.response.GetTxByIdExcRes;
import com.zhangfb95.crosschain.protocol.exc.response.QueryExcRes;
import com.zhangfb95.crosschain.protocol.exc.response.SendExcRes;
import com.zhangfb95.crosschain.protocol.exc.response.SignExcRes;

/**
 * @author zhangfubing
 * @since 2023/10/20
 */
public interface CrossChainService {

    void syncChainInfos();

    GetAccountExcRes getAccount(String serverId, GetAccountExcReq req);

    SignExcRes sign(String serverId, SignExcReq req);

    GetHeightExcRes getHeight(GetHeightExcReq req);

    GetBlockByNumberExcRes getBlockByNumber(GetBlockByNumberExcReq req);

    GetTxByIdExcRes getTxById(GetTxByIdExcReq req);

    QueryExcRes query(QueryExcReq req);

    SendExcRes send(SendExcReq req);
}
